package com.yeyks.common.em.cnbooking;

/**
 * @author fuchangshuai
 * @date 2019/09/23 14:07
 */
public enum CnBreakFastEnum {
    NO_ZAO("011001", "不含早餐"),
    SINGLE_ZAO("011002", "含单早"),
    BOTH_ZAO("011003", "含双早"),
    SINGLE_BOTH_ZAO("011004", "含单双早"),
    BED_ZAO("011007", "含床位早"),
    THREE_ZAO("011008", "含三早"),
    SIX_ZAO("011010", "含六早"),
    FOUR_ZAO("011011", "含四早"),
    EIGHT_ZAO("011012", "含八早"),
    FIVE_ZAO("011014", "含五早"),
    BOTH_ZAO_WU_OR_WAN("011015", "双早+午餐/晚餐");
    String value;
    String desc;

    CnBreakFastEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String value() {
        return this.value;
    }

    public String desc() {
        return this.desc;
    }

    public static String getDesc(String value) {
        for (CnBreakFastEnum cnResponseCodeEnum : values()) {
            if (cnResponseCodeEnum.value().equals(value)) {
                return cnResponseCodeEnum.desc();
            }
        }
        return null;
    }

    public static String getValue(String desc) {
        for (CnBreakFastEnum cnResponseCodeEnum : values()) {
            if (cnResponseCodeEnum.desc().equals(desc)) {
                return cnResponseCodeEnum.value();
            }
        }
        return null;
    }
}
